package cn.lg.soar.generator.model;

/**
 * @author luguoxiang 469599794@qq.com
 * @Date: 2024/1/2 15:33
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
public class ClassInfo {

    private String _import;

    private String _package;

    private String name;

    public ClassInfo(Class<?> clazz) {
        this(clazz.getName());
    }

    public ClassInfo(String name) {
        int i = name.lastIndexOf(".");
        this.name = name.substring(i + 1);
        this._package = name.substring(0, i);
        this._import = name;
    }

    public String getImport() {
        return _import;
    }

    public String getPackage() {
        return _package;
    }

    public String getName() {
        return name;
    }

    @Override
    public String toString() {
        return name;
    }
}
